package com.gxa.retail_admin.controller;

import com.gxa.common.vo.JsonResult;
import com.gxa.common.vo.R;

import com.gxa.modules.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@Api(value = "系统日志数据test",tags = "系统日志数据接口API-王梓鑫")
@RequestMapping(value = "/manage/log")
public class SysLogController {
    @Autowired(required = false)
    private SysLogService sysLogService;
    JsonResult jsonResult = new JsonResult();

    @RequestMapping(value = "/querySysLogMap",method = RequestMethod.GET)
    @RequiresPermissions("系统日志")
    @ApiOperation(value = "系统日志数据查询接口",notes = "查询系统日志数据",httpMethod = "GET", response = R.class)

    @ApiResponses({
            @ApiResponse(code=200,message = "success"),
            @ApiResponse(code=404,message = "找不到页面，接口或参数错误"),
            @ApiResponse(code=500,message = "后台错误")
    })
    @ResponseBody

    public JsonResult querySysLogMap(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer limit){

        jsonResult.setCode(200);

        return sysLogService.querySysLogMap(page,limit);

    }

}
